package com.lfp.consumer;

import com.lfp.config.rabbitmq.DirectExchangeQueueConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @Author lfp
 * @Date 2022/3/29 22:49
 * @Version 1.0
 */
@Slf4j
@Component
public class DirectExchangeQueueConsumer {

    //监听队列消息
    @RabbitListener(queues = DirectExchangeQueueConfig.DIRECT_QUEUE_NAME)
    public void receiveDirectExchangeQueueMessage(String message){
        log.info("接收到消息：{}",message);
    }
}
